package org.spring.springboot.controller;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("mq")
public class MQController {

  @Autowired private RabbitTemplate rabbitTemplate;

  @PostMapping(value = "demo")
  public void ddd(String string) {
    rabbitTemplate.convertAndSend("LYF", string);
  }
}
